.class public Lcom/brixd/niceapp/activity/NiceAppCommentActivity;
.super Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;
.source "NiceAppCommentActivity.java"


# instance fields
.field private mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

.field private mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mBaseComment:Lcom/brixd/niceapp/model/CommentModel;

.field private mComment:Landroid/widget/EditText;

.field private mDefaultHint:Ljava/lang/String;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mIsRequesting:Z

.field private mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

.field private mShareToWeibo:Landroid/widget/CheckBox;

.field private mType:Ljava/lang/String;

.field private mUserModel:Lcom/brixd/niceapp/model/UserModel;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 45
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;-><init>()V

    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/NiceAppCommentActivity;

    .prologue
    .line 45
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->checkAndCommitComments()V

    return-void
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;)Landroid/widget/CheckBox;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/NiceAppCommentActivity;

    .prologue
    .line 45
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mShareToWeibo:Landroid/widget/CheckBox;

    return-object v0
.end method

.method static synthetic access$202(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;Z)Z
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/NiceAppCommentActivity;
    .param p1, "x1"    # Z

    .prologue
    .line 45
    iput-boolean p1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mIsRequesting:Z

    return p1
.end method

.method private checkAndCommitComments()V
    .registers 3

    .prologue
    .line 237
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->validateInfo()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 238
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getCommentStr()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mShareToWeibo:Landroid/widget/CheckBox;

    invoke-virtual {v1}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v1

    invoke-direct {p0, v0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->doComment(Ljava/lang/String;Z)V

    .line 240
    :cond_13
    return-void
.end method

.method private doComment(Ljava/lang/String;Z)V
    .registers 29
    .param p1, "comment"    # Ljava/lang/String;
    .param p2, "shareToWeibo"    # Z

    .prologue
    .line 154
    move-object/from16 v0, p0

    iget-boolean v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mIsRequesting:Z

    if-eqz v5, :cond_10

    .line 155
    const v5, 0x7f0c00e1

    const/4 v6, 0x0

    const/16 v7, 0x11

    invoke-static {v5, v6, v7}, Lcom/brixd/niceapp/util/ToastUtils;->show(III)V

    .line 198
    :goto_f
    return-void

    .line 159
    :cond_10
    const/4 v5, 0x1

    move-object/from16 v0, p0

    iput-boolean v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mIsRequesting:Z

    .line 160
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v25

    .line 161
    .local v25, "userModel":Lcom/brixd/niceapp/model/UserModel;
    invoke-virtual/range {v25 .. v25}, Lcom/brixd/niceapp/model/UserModel;->getUid()I

    move-result v5

    invoke-static {v5}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(I)Lcom/brixd/niceapp/model/Token;

    move-result-object v24

    .line 162
    .local v24, "token":Lcom/brixd/niceapp/model/Token;
    invoke-static/range {p0 .. p0}, Lcom/brixd/niceapp/service/adapter/ReqRestAdapter;->niceAppAdapter(Landroid/content/Context;)Lretrofit/RestAdapter;

    move-result-object v5

    const-class v6, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {v5, v6}, Lretrofit/RestAdapter;->create(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    .line 163
    .local v4, "request":Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;
    new-instance v12, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$4;

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move/from16 v2, p2

    invoke-direct {v12, v0, v1, v2}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$4;-><init>(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;Ljava/lang/String;Z)V

    .line 185
    .local v12, "commentCallback":Lretrofit/Callback;, "Lretrofit/Callback<Lorg/json/JSONObject;>;"
    new-instance v23, Ljava/util/HashMap;

    invoke-direct/range {v23 .. v23}, Ljava/util/HashMap;-><init>()V

    .line 186
    .local v23, "map":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v5, "ArticleName"

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v6}, Lcom/brixd/niceapp/model/BaseAppModel;->getTitle()Ljava/lang/String;

    move-result-object v6

    move-object/from16 v0, v23

    invoke-virtual {v0, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 187
    const-string v5, "ArticleId"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v7, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v7}, Lcom/brixd/niceapp/model/BaseAppModel;->getId()I

    move-result v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ""

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    move-object/from16 v0, v23

    invoke-virtual {v0, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 189
    invoke-virtual/range {p0 .. p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getActivity()Landroid/app/Activity;

    move-result-object v5

    const-string v6, "DetailClickSendComment"

    move-object/from16 v0, v23

    invoke-static {v5, v6, v0}, Lcom/umeng/analytics/MobclickAgent;->onEvent(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V

    .line 191
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    if-nez v5, :cond_9e

    .line 192
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getId()I

    move-result v5

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mType:Ljava/lang/String;

    invoke-virtual/range {v24 .. v24}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v8

    invoke-virtual/range {v24 .. v24}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v10

    invoke-virtual/range {v24 .. v24}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v11

    move-object/from16 v7, p1

    invoke-interface/range {v4 .. v12}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->comment(ILjava/lang/String;Ljava/lang/String;JILjava/lang/String;Lretrofit/Callback;)V

    goto/16 :goto_f

    .line 194
    :cond_9e
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mBaseComment:Lcom/brixd/niceapp/model/CommentModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/CommentModel;->getCommentId()I

    move-result v14

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/CommentModel;->getCommentId()I

    move-result v15

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mBaseComment:Lcom/brixd/niceapp/model/CommentModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/CommentModel;->getType()Ljava/lang/String;

    move-result-object v16

    invoke-virtual/range {v24 .. v24}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v18

    .line 195
    invoke-virtual/range {v24 .. v24}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v20

    invoke-virtual/range {v24 .. v24}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v21

    move-object v13, v4

    move-object/from16 v17, p1

    move-object/from16 v22, v12

    .line 194
    invoke-interface/range {v13 .. v22}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->commentReplay(IILjava/lang/String;Ljava/lang/String;JILjava/lang/String;Lretrofit/Callback;)V

    goto/16 :goto_f
.end method

.method private getCommentStr()Ljava/lang/String;
    .registers 4

    .prologue
    .line 243
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mComment:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    const-string v1, "\n"

    const-string v2, "<br>"

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private initWidgetActions()V
    .registers 3

    .prologue
    .line 127
    new-instance v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$1;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$1;-><init>(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->setOnBackClickListener(Landroid/view/View$OnClickListener;)V

    .line 135
    new-instance v0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$2;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$2;-><init>(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->setOnCommitClickListener(Landroid/view/View$OnClickListener;)V

    .line 143
    const v0, 0x7f0a00ed

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$3;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity$3;-><init>(Lcom/brixd/niceapp/activity/NiceAppCommentActivity;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 151
    return-void
.end method

.method private initWidgets()V
    .registers 6

    .prologue
    const/4 v4, 0x0

    const v3, 0x7f0200b3

    const/4 v2, 0x1

    .line 98
    const v1, 0x7f0c0048

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->setCommitBtnText(I)V

    .line 100
    const v1, 0x7f0a00ec

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mComment:Landroid/widget/EditText;

    .line 101
    const v1, 0x7f0a00b5

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/CheckBox;

    iput-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mShareToWeibo:Landroid/widget/CheckBox;

    .line 103
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 104
    new-instance v1, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    invoke-virtual {v1, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    invoke-virtual {v1, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    invoke-virtual {v1, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    sget-object v2, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    .line 105
    invoke-virtual {v1, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-virtual {v1, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    new-instance v2, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v2}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    invoke-virtual {v1, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    .line 106
    invoke-virtual {v1, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    invoke-virtual {v1, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    .line 107
    invoke-virtual {v1, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 109
    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    if-nez v1, :cond_ac

    .line 110
    const v1, 0x7f0c0040

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->setTopTitle(Ljava/lang/String;)V

    .line 111
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getBackIconView()Landroid/widget/ImageView;

    move-result-object v0

    .line 112
    .local v0, "icon":Landroid/widget/ImageView;
    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 113
    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    iget-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/BaseAppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v1, v2, v0, v3}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 118
    .end local v0    # "icon":Landroid/widget/ImageView;
    :goto_81
    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mComment:Landroid/widget/EditText;

    iget-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mDefaultHint:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    .line 120
    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    if-eqz v1, :cond_96

    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v1}, Lcom/brixd/niceapp/model/UserModel;->getPlatform()Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    move-result-object v1

    sget-object v2, Lcom/brixd/niceapp/service/LoginService$SNSPlatform;->QQ:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    if-eq v1, v2, :cond_9a

    :cond_96
    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    if-eqz v1, :cond_ab

    .line 121
    :cond_9a
    const v1, 0x7f0a00ed

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V

    .line 122
    iget-object v1, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mShareToWeibo:Landroid/widget/CheckBox;

    invoke-virtual {v1, v4}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 124
    :cond_ab
    return-void

    .line 116
    :cond_ac
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "@"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/CommentModel;->getAuthorUser()Lcom/brixd/niceapp/model/CommonUserModel;

    move-result-object v2

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->setBackText(Ljava/lang/String;)V

    goto :goto_81
.end method

.method private validateInfo()Z
    .registers 5

    .prologue
    const/4 v1, 0x0

    .line 201
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getCommentStr()Ljava/lang/String;

    move-result-object v0

    .line 202
    .local v0, "comment":Ljava/lang/String;
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_12

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    const/4 v3, 0x5

    if-ge v2, v3, :cond_1b

    .line 203
    :cond_12
    const v2, 0x7f0c0045

    const/16 v3, 0x11

    invoke-static {v2, v1, v3}, Lcom/brixd/niceapp/util/ToastUtils;->show(III)V

    .line 216
    :goto_1a
    return v1

    .line 207
    :cond_1b
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->isUserLogin()Z

    move-result v2

    if-nez v2, :cond_3d

    .line 208
    iget-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    if-nez v2, :cond_31

    .line 209
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getSignonCommentHint()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/brixd/niceapp/service/LoginService;->login(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_1a

    .line 211
    :cond_31
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getSignonCommentReplyHint()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/brixd/niceapp/service/LoginService;->login(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_1a

    .line 216
    :cond_3d
    const/4 v1, 0x1

    goto :goto_1a
.end method


# virtual methods
.method public finish()V
    .registers 3

    .prologue
    .line 221
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->finish()V

    .line 222
    const/4 v0, 0x0

    const v1, 0x7f040015

    invoke-virtual {p0, v0, v1}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->overridePendingTransition(II)V

    .line 223
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 4
    .param p1, "bundle"    # Landroid/os/Bundle;

    .prologue
    .line 62
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onCreate(Landroid/os/Bundle;)V

    .line 63
    const v0, 0x7f03003f

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->setContentView(I)V

    .line 65
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getSwipeBackLayout()Lcom/brixd/android/swipeback/lib/SwipeBackLayout;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/brixd/android/swipeback/lib/SwipeBackLayout;->setEnableGesture(Z)V

    .line 67
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "Type"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mType:Ljava/lang/String;

    .line 69
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "AppModel"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/BaseAppModel;

    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    .line 70
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "UserModel"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/UserModel;

    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    .line 71
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "BaseComment"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/CommentModel;

    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mBaseComment:Lcom/brixd/niceapp/model/CommentModel;

    .line 72
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "ReplayToComment"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/CommentModel;

    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mReplayToComment:Lcom/brixd/niceapp/model/CommentModel;

    .line 73
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "DefaultHint"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_71

    const v0, 0x7f0c0042

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    :goto_68
    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mDefaultHint:Ljava/lang/String;

    .line 75
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->initWidgets()V

    .line 76
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->initWidgetActions()V

    .line 77
    return-void

    .line 73
    :cond_71
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "DefaultHint"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    goto :goto_68
.end method

.method protected onPause()V
    .registers 2

    .prologue
    .line 90
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onPause()V

    .line 91
    const-string v0, "NiceAppCommentActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 92
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 94
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/squareup/otto/Bus;->unregister(Ljava/lang/Object;)V

    .line 95
    return-void
.end method

.method protected onResume()V
    .registers 2

    .prologue
    .line 81
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onResume()V

    .line 82
    const-string v0, "NiceAppCommentActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 83
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 85
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/squareup/otto/Bus;->register(Ljava/lang/Object;)V

    .line 86
    return-void
.end method

.method public onUserSigon(Lcom/brixd/niceapp/bus/event/UserSignonEvent;)V
    .registers 4
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/UserSignonEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 228
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    .line 229
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    if-eqz v0, :cond_26

    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v0}, Lcom/brixd/niceapp/model/UserModel;->getPlatform()Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    move-result-object v0

    sget-object v1, Lcom/brixd/niceapp/service/LoginService$SNSPlatform;->QQ:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    if-ne v0, v1, :cond_26

    .line 230
    const v0, 0x7f0a00ed

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 231
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->mShareToWeibo:Landroid/widget/CheckBox;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 233
    :cond_26
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/NiceAppCommentActivity;->checkAndCommitComments()V

    .line 234
    return-void
.end method
